﻿<cfsilent>
	<cfscript>
	
		teacherName = event.getArg('TNAME','未指定');
	
		sql = "SELECT a.institute_id,
					  a.institute_name,
            		  a.institute_short,
					  a.institute_english,
					  a.institute_pyidx,
					  a.classification,
					  a.institute_address
				FROM t_institute a 
				WHERE a.institute_id = :insId ";
		queryObj = new Query( datasource=application.dnsSlave ); 
		queryObj.addParam( name="insId", value=event.getArg("DepID"), cfsqltype="cf_sql_varchar" );
		rs_department= queryObj.execute( sql=sql ).getResult();
		
		sql = "SELECT  a.classification,
					   a.classification_name
				FROM t_institute_type a ";
		queryObj = new Query( datasource=application.dnsSlave ); 
		rs_type= queryObj.execute( sql=sql ).getResult();
		
		sql = "SELECT  a.group_id,
					   a.auth_id,
					   a.tch_id,
					   b.tch_name,
					   c.tp_series  
				FROM t_institute_admin a 
					 INNER JOIN t_teacher b ON b.tch_id = a.tch_id 
					 INNER JOIN t_technical_position c ON c.tp_id = b.tp_id 
				WHERE a.institute_id = :insId  
				ORDER BY a.group_id ASC";
		queryObj = new Query( datasource=application.dnsSlave ); 
		queryObj.addParam( name="insId", value=rs_department.institute_id, cfsqltype="cf_sql_varchar" );
		rs_admin= queryObj.execute( sql=sql ).getResult();
		
		sql = "SELECT  a.sbj_id,
					   a.sbj_name,
					   a.term_start,
					   a.level_code,
					   b.learning_branch 
				FROM t_subject a 
					 INNER JOIN t_learning_branch b ON b.b_id = a.b_id 
				WHERE a.institute_id = :Institute 
					  AND
					  a.sbj_direction = :SubjectDirection 
				ORDER BY a.level_code ASC,a.term_start ASC,a.sbj_name ASC ";
		queryObj = new Query( datasource=application.dnsSlave ); 
		queryObj.addParam( name="Institute", value=rs_department.institute_id, cfsqltype="cf_sql_varchar" );
		queryObj.addParam( name="SubjectDirection", value='0', cfsqltype="cf_sql_char" );
		rs_subject= queryObj.execute( sql=sql ).getResult();
		
		sql = "SELECT  a.b_id,
					   a.learning_branch 
				FROM t_learning_branch a 
				ORDER BY a.b_id ASC";
		queryObj = new Query( datasource=application.dnsSlave ); 
		rs_branch= queryObj.execute( sql=sql ).getResult();
		
		sql = "SELECT  a.campus_id ,
					   a.campus_name 
				FROM t_campus a  
				ORDER BY a.campus_id ASC";
		queryObj = new Query( datasource=application.dnsSlave ); 
		rs_campus= queryObj.execute( sql=sql ).getResult();
		
		event.setArg("pageTitle", "教学运行基础数据 - 行政建制 - 院系(部)概况 - " & rs_department.institute_name);

		targetArgs = structNew();
		structInsert(targetArgs, "DepID", rs_department.institute_id, true);

		currentTab = event.getArg("TabID", "labSubject");

		dictAdvice = getProperty("serviceFactory").getBean("senateDictionaryAdvice");

	</cfscript>
</cfsilent>

<div id="headArea">
	<div class="uiHeader uiHeaderWithImage ptm">
		<div class="clearfix uiHeaderTop">
			<div class="uiHeaderActions rfloat">
				<a class="uiButton" href="<cfoutput>#buildURL('organizeAdministration')#</cfoutput>"><i class="mrs img btnPublish"></i><span class="uiButtonText">二级学院行政建制</span></a>
			</div>
			<div>
				<h2 class="uiHeaderTitle">
					<i class="uiHeaderImage img icon16x16 card"></i>院系(部)概况 - <cfoutput>#rs_department.institute_name#</cfoutput>
				</h2>
			</div>
		</div>
	</div>
</div>

<div class="UIElement">
	<ul class="senateFirstPage">
		<li>
			<div class="clearfix" id="summary">
				<div class="UItab">
					<div class="tabLables">
						<span <cfif currentTab eq "labBaseInfo">class="active"</cfif> id="labBaseInfo" tabTarget="BaseInfo">院系基础信息</span>
						<span <cfif currentTab eq "labSubject">class="active"</cfif> id="labSubject" tabTarget="Subject">专业设置</span>
						<!---<span <cfif currentTab eq "labAdminGroup">class="active"</cfif> id="labAdminGroup" tabTarget="AdminGroup">管理团队</span>--->
						<!---<span <cfif currentTab eq "labPatchCreate">class="active"</cfif> id="labPatchCreate" tabTarget="PatchCreate">创建行政班</span>--->
					</div>
				</div>
				<script language="javascript" type="text/javascript">
					//<![CDATA[
					<!--
					$(document).ready(function() {
						
						/* init Tab */
						$("div.tabContent").hide();
						$("div#" + $("div.tabLables span.active").attr("tabTarget")).show();
						
						$("div.tabLables > span").click(function(){
							var $targetID = $(this).attr("tabTarget");
							
							$("div.tabLables span").removeClass("active");
							$(this).addClass("active");
							
							$("div.tabContent").not('[id="' + $targetID + '"]').hide();
							$("div.tabContent#" + $targetID).show();
						});
						
					});
					// -->
					//]]>				
				</script>
				
				<div id="BaseInfo" class="tabContent">
					
					<cfif currentTab eq "labBaseInfo">
						<div class="systemNotice">
							<h3><span class="img icon16x16 info"></span>院系基础数据已更新</h3>
							<p>在填写完整学院基础数据后, 你可以通过上面的标签切换, 分别查阅到学院下设的专业信息以及教学管理人员信息.</p>
						</div>
					</cfif>
					
					<form id="formEdit" onSubmit="javascript:return processVerfiyForm('formEdit');" class="formWrapper" method="post" action="<cfoutput>#buildURL('instituteUpdateDo')#</cfoutput>">
						
						<input type="hidden" name="InstituteID" value="<cfoutput>#rs_department.institute_id#</cfoutput>" />
						
						<div class="label">
							<span class="req">*</span><b>部门正式名称</b>
							<input name="InstituteName" id="InstituteName" type="text" class="typeText" verification="required" maxlength="50" value="<cfoutput>#event.getArg('InstituteName', rs_department.institute_name)#</cfoutput>" />
						</div>

						<div class="label">
							<span class="req">*</span><b>简称</b>
							<input name="InstituteShortName" id="InstituteShortName" type="text" class="typeTextTiny" verification="required" maxlength="6" value="<cfoutput>#event.getArg('InstituteShortName', rs_department.institute_short)#</cfoutput>" />
						</div>
						
						<div class="label">
							<b>单位类别</b>
							<select name="Classification">
                                <cfloop query="rs_type"  >
									<option <cfif rs_type.classification eq event.getArg("Classification", rs_department.classification)>selected="selected"</cfif> value="<cfoutput>#rs_type.classification#</cfoutput>"><cfoutput>#rs_type.classification_name#</cfoutput></option>
								</cfloop>
							</select>
						</div>
						
						<hr/>
						
						<div class="label">
							<b>英文名称</b>
							<input name="InstituteEnglish" id="InstituteEnglish" type="text" class="typeText typeEnglish" maxlength="180" value="<cfoutput>#event.getArg('InstituteEnglish', rs_department.institute_english)#</cfoutput>" />
						</div>
						
						<div class="label">
							<b>简拼</b>
							<input name="InstitutePinyin" id="InstitutePinyin" type="text" class="typeCode" maxlength="6" value="<cfoutput>#event.getArg('InstitutePinyin', rs_department.institute_pyidx)#</cfoutput>" />
							<p class="notice">请填写单位简称的拼音首字母, 如果保留空值, 系统将自动根据汉语拼音读音生成. 如果简称中包含多音字, 拼音首字母可能不准确.</p>
						</div>
						
						<div class="label">
							<b>办公地址</b>
							<input name="InstituteAddress" id="InstituteAddress" type="text" class="typeText" maxlength="30" value="<cfoutput>#event.getArg('InstituteAddress',rs_department.institute_address)#</cfoutput>" />
						</div>
						
						<hr/>
						
						<div class="lable">
							<input class="button" type="submit" value="提交" />
							<input class="button" type="reset" value="重设表格" />
						</div>
						
					</form>
					
					
				</div>
				
				<div id="Subject" class="tabContent">

					<cfif rs_subject.recordCount>
							<div class="noticeBlock">
								<div class="operation">
									<a class="uiButton uiButtonSpecial" href="<cfoutput>#buildURL('subjectDownloadExcel', targetArgs)#</cfoutput>"><i class="mrs img btnDownload"></i><span class="uiButtonText">下载专业设置信息</span></a>
									<a class="uiButton uiButtonSpecial" href="<cfoutput>#buildURL('classDepartmentDownloadExcel', targetArgs)#</cfoutput>"><i class="mrs img btnDownload"></i><span class="uiButtonText">下载班级信息</span></a>
								</div>
								<h3>招生专业</h3>
								<p><span class="img icon16x16 message"></span>这里列出的是<cfoutput>#rs_department.institute_name#</cfoutput>下设的招生专业. 如果您需要设置新的专业信息, <a href="javascript:showCreateFrom();">可以通过点击这里进行</a></p>
								<hr/>
							</div>
					
							<script language="javascript" type="text/javascript">
								//<![CDATA[
								<!--
								function showCreateFrom() {
									$("form#formCreate").toggleClass("hidden_elem");
									return void(0);
								}
								// -->
								//]]>				
							</script>
							
							<div class="clearfix">
								<div class="UICardTable">
                                    <cfloop query="rs_subject" >
										<cfset structInsert(targetArgs, "SubID", rs_subject.sbj_id, true) />
										<dl>
											<dt>
												<a href="<cfoutput>#buildURL('subjectSetting', targetArgs)#</cfoutput>">
													<em class="subject"><!--imgholder--></em>
													<dd>
														<h3><cfoutput>#rs_subject.sbj_name#</cfoutput></h3>
														<div><cfoutput>#dictAdvice.getTermEnrol(rs_subject.term_start)#-#dictAdvice.getStudentLevel(rs_subject.level_code)#(#rs_subject.learning_branch#)</cfoutput></div>
													</dd>
												</a>
											</dt>
										</dl>
									</cfloop>
								</div>
							</div>
						<cfelse>
							<div class="systemNotice">
								<h3><span class="img icon16x16 info"></span>没有设置任何专业信息</h3>
								<p>当前您还没有设置<cfoutput>#rs_department.institute_name#</cfoutput>下属的专业信息, 请通过完善下列表单设置该学院的第一个招生专业.</p>
							</div>
					</cfif>

					<form id="formCreate" onSubmit="javascript:return processVerfiyForm('formCreate');" class="formWrapper <cfif rs_subject.recordCount>hidden_elem</cfif>" method="post" action="<cfoutput>#buildURL('subjectCreateDo')#</cfoutput>">

						<input type="hidden" name="InstituteID" value="<cfoutput>#rs_department.institute_id#</cfoutput>" />
						
						<div class="label">
							<span class="req">*</span><b>专业正式名称</b>
							<input name="SubjectName" id="SubjectName" type="text" class="typeTextShort" verification="required" maxlength="30" value="<cfoutput>#event.getArg('SubjectName')#</cfoutput>" />
						</div>
						
						<div class="label">
							<span class="req">*</span><b>国家专业代码</b>
							<input name="SubjectCode" id="SubjectCode" type="text" class="typeCode" verification="required" maxlength="7" value="<cfoutput>#event.getArg('SubjectCode')#</cfoutput>" />
							<p class="notice">国家专业代码请参阅教育部标准 JB/BSSZY-2006 《授予博士、硕士学位和培养研究生的学科、专业代码》规范填写</p>
						</div>
						
						<div class="label">
							<span class="req">*</span><b>专业简称</b>
							<input name="SubjectShortName" id="SubjectShortName" type="text" class="typeTextTiny" verification="required" maxlength="10" value="<cfoutput>#event.getArg('SubjectShortName')#</cfoutput>" />
						</div>
						
						<div class="label">
							<b>培养层次</b>
							<input name="StudentLevel" type="radio" class="typeRadio" checked="checked" value="3" />本科
							<input name="StudentLevel" type="radio" class="typeRadio" value="4" />专科
						</div>
						
						<div class="label">
							<b>招生学期</b>
							<input name="TermStart" type="radio" class="typeRadio" checked="checked" value="1" />秋季
							<input name="TermStart" type="radio" class="typeRadio" value="2" />春季
						</div>
						
						<hr/>
						
						<div class="label">
							<b>英文名称</b>
							<input name="SubjectEnglish" id="SubjectEnglish" type="text" class="typeText typeEnglish" maxlength="180" value="<cfoutput>#event.getArg('SubjectEnglish')#</cfoutput>" />
						</div>
						
						<div class="label">
							<b>学科门类</b>
							<select name="LearningBranch">
                                <cfloop query="rs_branch" >
									<option value="<cfoutput>#rs_branch.b_id#</cfoutput>"><cfoutput>#rs_branch.learning_branch#</cfoutput></option>
								</cfloop>
							</select>
						</div>
						
						<div class="label">
							<b>学制</b>
							<input name="SchoolingLength" type="radio" class="typeRadio" value="2.5" />两年半
							<input name="SchoolingLength" type="radio" class="typeRadio" value="3" />三年
							<input name="SchoolingLength" type="radio" class="typeRadio" checked="checked" value="4" />四年
							<input name="SchoolingLength" type="radio" class="typeRadio" value="5" />五年
							<input name="SchoolingLength" type="radio" class="typeRadio" value="7" />七年
						</div>
						
						<hr/>
						
						<div class="lable">
							<input class="button" type="submit" value="提交" />
							<input class="button" type="reset" value="重设表格" />
						</div>
						
					</form>
				</div>
				
				<div id="AdminGroup" class="tabContent">
					
					<cfset adminGroupList = "" />
					<cfset targetGroupList = "AD01, AD11, AD21" />
					
                    <cfloop query="rs_admin" >
						<cfif listFindNoCase(targetGroupList, rs_admin.group_id, " ,") AND (not ListFind(adminGroupList, rs_admin.group_id))>
							<cfset adminGroupList = listAppend(adminGroupList, rs_admin.group_id) />
						</cfif>
					</cfloop>
										
					<cfif listLen(adminGroupList)>
							
							<div class="noticeBlock">
								<h3>学院教学管理团队</h3>
								<p><span class="img icon16x16 message"></span>这里列出的是<cfoutput>#rs_department.institute_name#</cfoutput>的教学管理团队. 如果您需要授权新的老师加入管理团队, <a href="javascript:showAuthFrom();">可以通过点击这里进行</a></p>
								<hr/>
							</div>
					
							<script language="javascript" type="text/javascript">
								//<![CDATA[
								<!--
								function showAuthFrom() {
									$("form#formSearch").toggleClass("hidden_elem");
									$("ul#gridAuth").toggleClass("hidden_elem");
									$("div#formSearchResult").addClass("hidden_elem");
									$("form#formAuth").addClass("hidden_elem");
									return void(0);
								}
								// -->
								//]]>				
							</script>
							
							
							<ul id="gridAuth" class="groupUser">
								<cfloop list="#adminGroupList#" index="group">
								<li>
									<div class="clearfix" id="group<cfoutput>#group#</cfoutput>">
										<cfswitch expression="#group#">
											<cfcase value="AD01"><h2>主管教学院长</h2></cfcase>
											<cfcase value="AD11"><h2>教学管理主任</h2></cfcase>
											<cfcase value="AD21"><h2>教学秘书</h2></cfcase>
										</cfswitch>
										<div class="clearfix">
                                            <cfloop  query="rs_admin" >
												<cfif rs_admin.group_id eq group>
													<cfset structInsert(targetArgs, "AUTH", rs_admin.auth_id, true) />
													<cfset structInsert(targetArgs, "GroupID", rs_admin.group_id, true) />
													<cfset structInsert(targetArgs, "TeacherID", rs_admin.tch_id, true) />
													<div class="UISmallUserCard">
														<div class="cardContent"> 
															<img class="img" src="<cfoutput>#getProperty('cdnServer')#</cfoutput><cfoutput>#getContextRoot()#</cfoutput>/acadmicRes/assets/graphic/userSmall.png" style="background-image: url('<cfoutput>#getContextRoot()#</cfoutput>/acadmicManager/teacher/portrait/<cfoutput>#rs_admin.tch_id#</cfoutput>.jpg');">
															<div class="cardDetail">
																<h3><cfoutput>#rs_admin.tch_name# <span class="uid">(#rs_admin.tch_id#)</span></cfoutput><a href="<cfoutput>#buildURL('instituteAdminRemoveDo', targetArgs)#</cfoutput>" class="kill"><!--.--></a></h3>
																<p><cfoutput>#rs_admin.tp_series#</cfoutput></p>
																
															</div>
														</div>
													</div>
												</cfif>
											</cfloop>
										</div>
									</div>
								</li>
								</cfloop>
							</ul>
							
						<cfelse>
							<div class="systemNotice">
								<h3><span class="img icon16x16 info"></span>没有建立部门管理团队</h3>
								<p>当前您还没有设置<cfoutput>#rs_department.institute_name#</cfoutput>的教学管理团队, 请通过完善下列表单设置学院的管理团队.</p>
							</div>
					</cfif>
					
					<div id="teacherGrid">
						
						<form id="formSearch" class="formWrapper Transparent <cfif listLen(adminGroupList)>hidden_elem</cfif>" method="post">
							<div class="label">
								<b>教师姓名或职工号</b>
								<input name="Keywords" id="Keywords" type="text" class="typeText" verification="required" maxlength="128" value="<cfoutput>#event.getArg('Keywords')#</cfoutput>" />
							</div>
							<hr/>
							<div class="lable">
								<input class="button1" type="submit" value="搜索教师" />
								<input id="formSearchReset" class="button" type="button" value="返回" />
							</div>
						</form>
						
						<div id="formSearchResult" class="UICardTable">
						</div>
						
						<form id="formAuth" class="formWrapper hidden_elem" method="post" action="<cfoutput>#buildURL('instituteAdminCreateDo')#</cfoutput>">
							
							<input type="hidden" name="InstituteID" value="<cfoutput>#rs_department.institute_id#</cfoutput>" />

							<div class="label">
								<b>职工号</b>
								<input readonly name="TeacherID" id="TeacherID" type="text" class="typeTextReadOnly" verification="required" value="" />
							</div>
							<div class="label">
								<b>教师</b>
								<input readonly name="TeacherName" id="TeacherName" type="text" class="typeTextReadOnly" verification="required" value="" />
							</div>
							<div class="label">
								<b>管理团队角色</b>
								<input name="GroupID" type="radio" class="typeRadio" value="AD01" />主管教学院长
								<input name="GroupID" type="radio" class="typeRadio" value="AD11" />教学管理主任
								<input name="GroupID" type="radio" class="typeRadio" checked="checked" value="AD21" />教学秘书
							</div>
							<hr/>
							<div class="lable">
								<input class="button" type="submit" value="授权" />
								<input id="formAuthReset" class="button" type="button" value="重新查找" />
							</div>
						</form>
						
						<script language="javascript" type="text/javascript">
							//<![CDATA[
							<!--
							$("input#formAuthReset").click(function(){
								$("form#formSearch").removeClass("hidden_elem");
								$("div#formSearchResult").removeClass("hidden_elem");
								$("form#formAuth").addClass("hidden_elem");
							});
							
							$("input#formSearchReset").click(function(){
								
								$("ul#gridAuth").removeClass("hidden_elem");
								
								$("form#formSearch").addClass("hidden_elem");
								$("div#formSearchResult").addClass("hidden_elem");
								$("form#formAuth").addClass("hidden_elem");
							});
							
							$("#formSearch").submit(function(){
								
								if (processVerfiyForm('formSearch')) {
									
									$.getJSON(
											'<cfoutput>#buildURL("getTeacherByKeywords")#</cfoutput>',
											{
												'Keywords': $("form#formSearch input#Keywords").val(),
												'seed': (new Date()).getTime()
											},
											function(data) {
												
												$div = $("div#formSearchResult").html("").removeClass("hidden_elem");
												$("form#formAuth").addClass("hidden_elem");
												
												for (var i=0; i<data.length; i++) {
											
													var $element = $("<dl><dt><a><i class='sex" + data[i][2] + "'></i><dd><h3>" + data[i][1] + " [" + data[i][3] + "]" + "</h3><p>(" + data[i][0] + ")</p></dd></a></dt></dl>");
													
													$element
														.attr({
															'TeacherID' : data[i][0],
															'TeacherName' : data[i][1]
														})
														.click(function(){
															
															var name = $(this).attr('TeacherName');
															var id = $(this).attr('TeacherID');
															
															$("form#formAuth input#TeacherID").val(id);
															$("form#formAuth input#TeacherName").val(name);
															
															$("form#formSearch").addClass("hidden_elem");
															$("div#formSearchResult").addClass("hidden_elem");
															$("form#formAuth").removeClass("hidden_elem");
													
														})
														.appendTo($div);
													
												}
												
											});
									
								}
							
								return false;
							});
							// -->
							//]]>
						</script>
						
					</div>

				</div>
				
				<div id="PatchCreate" class="tabContent">
				
					<cfif rs_subject.recordCount>
				
							<div class="noticeBlock">
								<h3><cfoutput>#rs_department.institute_name#</cfoutput> 创建行政班</h3>
								<p><span class="img icon16x16 message"></span>“行政班”概念通常用于简化专业招生后的教学运行. 班级的数量和规模与当年招生专业人数息息相关. 如果您清楚<cfoutput>#rs_department.institute_name#</cfoutput>在某个年级的招生大致规模, 可以在这里快速的创建行政班.</p>
								<hr/>
							</div>
					
							<form id="formBatch" onSubmit="javascript:return processCreate();" class="formWrapper" method="post" action="<cfoutput>#buildURL('classBatchCreateDo')#</cfoutput>">
							
								<input id="TeacherID2" name="TeacherID2" type="hidden" value="" />
						
								<div class="label">
									<b>专业</b>
									<select name="SubjectID">
                                        <cfloop query="rs_subject" >
											<option value="<cfoutput>#rs_subject.sbj_id#</cfoutput>"><cfoutput>#rs_subject.sbj_name#</cfoutput></option>
										</cfloop>
									</select>
								</div>
						
								<div class="label">
									<b>计划招生人数</b>
									<input name="StudentCount" id="StudentCount" type="text" class="typeSmallInt" verification="integer" maxlength="4" value="" />
									<p class="notice">在这里填写专业招生人数和班级数量, 系统会自动创建相应的行政班信息.</p>
								</div>
						
								<div class="label">
									<b>入学年份</b>
									<select name="Grade">
										<cfloop from="#(year(now())-4)#" to="#(year(now())+4)#" index="grade">
										<option <cfif grade eq year(now())>selected="selected"</cfif> value="<cfoutput>#grade#</cfoutput>"><cfoutput>#grade#</cfoutput></option>
										</cfloop>
									</select>
								</div>
								
								<div class="label">
									<b>班级数量</b>
									<input name="ClassCount" id="ClassCount" type="text" value="1" class="typeTinyInt" verification="integer" maxlength="2" value="" />     
								</div>
								
								<div class="label">
									<b>班主任</b>
									<input name="TeacherName" id="TeacherName" type="text" disabled="disabled" class="typeTextDynamic " verification="required" value="<cfoutput>#teacherName#</cfoutput>" /><span id="teacherTrigger" class="btnSearch"></span>
								</div>
																
								<div class="label">
									<b>所在校区</b>
									<select name="CampusID">
                                        <cfloop query="rs_campus" >
											<option value="<cfoutput>#rs_campus.campus_id#</cfoutput>"><cfoutput>#rs_campus.campus_name#</cfoutput></option>
										</cfloop>
									</select>
								</div>
								
								<hr/>
						
								<div class="lable">
									<input class="button" type="submit" value="生成行政班" />
									<input class="button" type="reset" value="重设表格" />
								</div>
						
							</form>
							
							<script language="javascript" type="text/javascript">
								//<![CDATA[
								<!--
								function processCreate() {
									
									var teacherID = $("#TeacherID2").val();
									var StudentCount = parseInt($("#StudentCount").val());
									
									if (teacherID != "") {
										
										if (StudentCount > 0) {
											return true;
										}
										else {
											$("#StudentCount").addClass("typeError").focus();
											return false;
										}
										
									}
									else {
										alert("请先指定任课教师");
										
										$("#formBatch").addClass("hidden_elem");
										$("#teacherBox").removeClass("hidden_elem");
										
										return false;
									}
									
								}
								
								$(document).ready(function() {
								
									$("#teacherTrigger").click(function(){

										$("#formBatch").addClass("hidden_elem");
										$("#teacherBox").removeClass("hidden_elem");

									});
									
								});
								// -->
								//]]>
							</script>
					
						<cfelse>
						
							<div class="systemNotice">
								<h3><span class="img icon16x16 info"></span>没有设置任何专业信息</h3>
								<p>当前您还没有设置<cfoutput>#rs_department.institute_name#</cfoutput>下属的专业信息, 请先完成专业设置以后再创建专业下属的行政班.</p>
							</div>
						
					</cfif>
					
				</div>
				
				<div id="teacherBox" class="hidden_elem">
						
					<form id="formSearchTeacher" class="formWrapper Transparent" method="post">
						<div class="label">
							<b>教师姓名或职工号</b>
							<input name="Keywords" id="Keywords" type="text" class="typeText" verification="required" maxlength="128" value="<cfoutput>#event.getArg('Keywords')#</cfoutput>" />
						</div>
						<hr/>
						<div class="lable">
							<input class="button1" type="submit" value="搜索教师" />
							<input id="formSearchReset2" class="button" type="button" value="返回" />
						</div>
					</form>
						
					<div id="formSearchResult2" class="UICardTable"></div>
						
					<script language="javascript" type="text/javascript">
						//<![CDATA[
						<!--
						$("input#formSearchReset2").click(function(){
						
							$("#formBatch").removeClass("hidden_elem");
							$("#teacherBox").addClass("hidden_elem");
								
						});
							
						$("#formSearchTeacher").submit(function(){
								
							if (processVerfiyForm('formSearchTeacher')) {
							
								$.getJSON(
										'<cfoutput>#buildURL("getTeacherByKeywords")#</cfoutput>',
										{
											'Keywords': $("form#formSearchTeacher input#Keywords").val(),
											'seed': (new Date()).getTime()
										},
										function(data) {
												
											$div = $("div#formSearchResult2").html("").removeClass("hidden_elem");
											$("form#formAuth").addClass("hidden_elem");
												
											for (var i=0; i<data.length; i++) {
											
												var $element = $("<dl><dt><a><i class='sex" + data[i][2] + "'></i><dd><h3>" + data[i][1] + " [" + data[i][3] + "]" + "</h3><p>(" + data[i][0] + ")</p></dd></a></dt></dl>");
													
												$element
													.attr({
														'TeacherID' : data[i][0],
														'TeacherName' : data[i][1]
													})
													.click(function(){
															
														var name = $(this).attr('TeacherName');
														var id = $(this).attr('TeacherID');
															
														$("form#formBatch input#TeacherID2").val(id);
														$("form#formBatch input#TeacherName").val(name + "(" + id + ")");
															
														/* backForm */
														$("#formBatch").removeClass("hidden_elem");
														$("#updateBox").removeClass("hidden_elem");
														$("#teacherBox").addClass("hidden_elem");
														
													})
													.appendTo($div);
													
											}
												
										});
								
							}
						
							return false;
						});
							
						// -->
						//]]>
					</script>
						
				</div>
			
				
			</div>
		</li>
	</ul>
</div>